<?php

$db = new mysqli('127.0.0.1', 'test', null, 'test', null, null);


if (mysqli_connect_errno()) {
    printf("Connect failed: %s\n", mysqli_connect_error());
    exit();
}


$re = $db->query("select * from test222 ");
var_dump( $re->num_rows );

if( $re ){
	while( $row = $re->fetch_array() ){
		var_dump($row);
	}
}


?>